package com.nativetalk.dao;

import com.nativetalk.bean.book.*;

import java.util.List;
import java.util.Map;

/**
 * Created by lizhun on 16/7/29.
 */
@MyBatisRepository
public interface TdNtBookCourseDao {
    /**
     * @Purpose  添加课程表
     * @version  3.0
     * @author   lizhun
     * @param    tdNtBookCourse
     * @return   void
     */
    public void insertBook(TdNtBookCourse tdNtBookCourse);
    /**
     * @Purpose  添加课程表
     * @version  3.0
     * @author   lizhun
     * @param    tdNtBookCourseWeek
     * @return   void
     */
    public void insertBookWeek(TdNtBookCourseWeek tdNtBookCourseWeek);
    /**
     * @Purpose  查找用户课程表信息
     * @version  3.0
     * @author   lizhun
     * @param    tdNtBookCourse
     * @return   TdNtBookCourse
     */
    public TdNtBookCourse findBook(TdNtBookCourse tdNtBookCourse);
    /**
     * @Purpose  查找用户课程表信息
     * @version  3.0
     * @author   lizhun
     * @param    map
     * @return   int
     */
    public int findBookByMembIdState(Map<String,Object> map);

    /**
     * @Purpose  查找用户课程表信息分页
     * @version  3.0
     * @author   lizhun
     * @param    map
     * @return   List<TdNtBookCourseMember>
     */
    public List<TdNtBookCourseMember> findBookByMembIdStatePage(Map<String,Object> map);
    /**
     * @Purpose  查找老师课程表信息
     * @version  3.0
     * @author   lizhun
     * @param    map
     * @return   int
     */
    public int findBookByTeaIdState(Map<String,Object> map);

    /**
     * @Purpose  查找老师课程表信息分页
     * @version  3.0
     * @author   lizhun
     * @param    map
     * @return   List<TdNtBookCourseTeacher>
     */
    public List<TdNtBookCourseTeacher> findBookByTeaIdStatePage(Map<String,Object> map);
    /**
     * @Purpose  查找所有可接单的课程表数量
     * @version  3.0
     * @author   lizhun
     * @param    map
     * @return   int
     */
    public int findBookByState(Map<String,Object> map);

    /**
     * @Purpose  查找可接单的课程表分页
     * @version  3.0
     * @author   lizhun
     * @param    map
     * @return   List<TdNtBookCourseTeacher>
     */
    public List<TdNtBookCourseTeacher> findBookByStatePage(Map<String,Object> map);
    /**
     * @Purpose  查找接单前用户设置的预约时间
     * @version  3.0
     * @author   lizhun
     * @param    book_cou_id
     * @return   List<TdNtBookCourseWeek>
     */
    public List<TdNtBookCourseWeek> findBookWeek(int book_cou_id);
    /**
     * @Purpose  添加课程预约信息
     * @version  3.0
     * @author   lizhun
     * @param    tdNtBookCourseWeekHis
     * @return   void
     */
    public void insertTdNtBookCourseWeekHis(TdNtBookCourseWeekHis tdNtBookCourseWeekHis);
    /**
     * @Purpose  查找接单后生成的记录
     * @version  3.0
     * @author   lizhun
     * @param    book_cou_id
     * @return   List<TdNtBookCourseWeekHis>
     */
    public List<TdNtBookCourseWeekHis> findBookWeekHis(int book_cou_id);
    /**
     * @Purpose  根据id查找课程表
     * @version  3.0
     * @author   lizhun
     * @param    book_cou_id
     * @return   TdNtBookCourse
     */
    public TdNtBookCourse findBookById(int book_cou_id);
    /**
     * @Purpose  查找未接单用户课程表信息
     * @version  3.0
     * @author   lizhun
     * @param    map
     * @return   int
     */
    public int findBookByUnfinishMembIdState(Map<String,Object> map);

    /**
     * @Purpose  查找未接单用户课程表信息分页
     * @version  3.0
     * @author   lizhun
     * @param    map
     * @return   List<TdNtBookCourseMember>
     */
    public List<TdNtBookCourseMemberUn> findBookByUnfinishMembIdStatePage(Map<String,Object> map);
//    /**
//     * @Purpose  查找大于等于某周几的课程表信息
//     * @version  3.0
//     * @author   lizhun
//     * @param    map
//     * @return   List<TdNtBookCourseMember>
//     */
//    public List<TdNtBookCourseWeek> findBookWeekGreater(Map<String,Object> map);
//    /**
//     * @Purpose  查找小于某周几的课程表信息
//     * @version  3.0
//     * @author   lizhun
//     * @param    map
//     * @return   List<TdNtBookCourseMember>
//     */
//    public List<TdNtBookCourseWeek> findBookWeekLess(Map<String,Object> map);
    /**
     * @Purpose  更新课程表
     * @version  3.0
     * @author   lizhun
     * @param    tdNtBookCourse
     * @return   void
     */
    public void updateBook(TdNtBookCourse tdNtBookCourse);
    /**
     * @Purpose  更新课程表预约信息
     * @version  3.0
     * @author   lizhun
     * @param    tdNtBookCourseWeek
     * @return   void
     */
    public void updateBookweek(TdNtBookCourseWeek tdNtBookCourseWeek);
    /**
     * @Purpose  添加课程表预约信息记录表
     * @version  3.0
     * @author   lizhun
     * @param    tdNtBookCourseWeekHis
     * @return   void
     */
    public void insertBookCourseWeekHis(TdNtBookCourseWeekHis tdNtBookCourseWeekHis);
    /**
     * @Purpose  根据id户设置的预约时间
     * @version  3.0
     * @author   lizhun
     * @param    book_cou_week_id
     * @return   TdNtBookCourseWeek
     */
    public TdNtBookCourseWeek findBookWeekById(int book_cou_week_id);
    /**
     * @Purpose  更新状态支付
     * @version  4.0
     * @author   lizhun
     * @param    map
     * @return   void
     */
    public void updateBookState(Map<String, Object> map);
    /**
     * @Purpose  根据套餐id查找课程
     * @version  3.0
     * @author   lizhun
     * @param    memb_set_id
     * @return   TdNtBookCourse
     */
    public TdNtBookCourse findTdNtBookCourseById(int memb_set_id);
}
